package com.example.gamestore.control;

import com.example.gamestore.WebSocket.MyWebSocket;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class WelcomeControl {
    @RequestMapping(value = "/socketindex")
    @ResponseBody
    public void index() {
        MyWebSocket.pushMessage("群主", "你们好", null);
    }
    @GetMapping("/socket")
    public String getlogin(){
        return "Socket";
    }
}
